using UnityEngine.Networking;

namespace SCore.Util
{
    public class BypassCertificate : CertificateHandler
    {
        protected override bool ValidateCertificate(byte[] certificateData)
        {
            // 总是返回 true，以禁用证书验证
            return true;
        }

        public static void Bypass(UnityWebRequest req)
        {
            req.certificateHandler = new BypassCertificate();
            req.disposeCertificateHandlerOnDispose = true;
        }
    }
}